#!/bin/bash

if [[ $1 == "--conda" ]];then
echo ">>> conda initialize"
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
  __conda_setup="$('/opt/miniconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
  if [ $? -eq 0 ]; then
    eval "$__conda_setup"
  else
    if [ -f "/opt/miniconda3/etc/profile.d/conda.sh" ]; then
        . "/opt/miniconda3/etc/profile.d/conda.sh"
    else
        export PATH="/opt/miniconda3/bin:$PATH"
    fi
  fi
  unset __conda_setup
  # <<< conda initialize <<<
  
  if [[ -n $2 ]];then
    conda activate $2
  fi
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$CONDA_PREFIX/lib
  cd /home/neousys/Works/rl_ws
fi

if [[ $1 == "--ros2" ]];then
  echo ">>> ros2 initialize"
  source /opt/ros/foxy/setup.bash
  source /home/neousys/Works/ros2_ws/install/setup.bash --extend
  cd /home/neousys/Works/ros2_ws
fi


if [[ $1 == "--mujoco" ]];then
  echo ">>> mujoco initialize"
  export PATH=$PATH:/opt/mujoco-3.2.6/bin
  export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/mujoco-3.2.6/lib
fi
